package com.wfs.suanfa.nio.demo;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author: wfs
 * @Date: 2020/4/21 10:51
 * @Description:
 */
public class NIOClient {
    public static void main(String[] args) throws IOException
    {
        Socket socket = new Socket("127.0.0.1",7001);
        OutputStream out = socket.getOutputStream();
        String string = "hello world";
        out.write(string.getBytes());
        out.close();
        socket.close();
    }

}
